from dataclasses import dataclass, asdict, fields

from ._orginal import Orginal

@dataclass(init=False)
class Version(Orginal):
    version: str

    def __init__(self, orginal=None, **kwargs):
        super().setOrginal(orginal)
        names = set([f.name for f in fields(self)])
        for k, v in kwargs.items():
            if k in names:
                setattr(self, k, v)
